10 REM **************************************************
20 REM *                   MR. SPOCK                    *
30 REM *                                                *
40 REM * ORIGINAL PROGRAM: ED -03/2023                  *
50 REM * MSXBASIC VERSION: ALEJANDRO YASSOGNA - 05/2023 *
60 REM **************************************************

' BASIC Anywhere Machine port by Charlie Veniot
' Based on the code found at https://www.facebook.com/groups/2057165187928233/permalink/3489273088050762/
' Changes noted with comments highlighted by a 🟠
' This program exported from BASIC Anywhere Machine (Version [5.2.3].[2023.08.29.21.34]) on 2023.10.05 at 20:32 (Coordinated Universal Time)

' 🟠 62 COLOR 15,4,4:SCREEN 2
screen _newimage(256, 192, 12) ' 🟠 added to replace line 62

75 FOR Q = 0 TO 191
80 LINE (0,Q)-(255,Q)
90 NEXT Q
95 COLOR 0 ' 🟠 Changed color from 1 to 0
100 FOR I = 1 TO 4
102 READ A,B 
103 READ C,D
104 GOSUB 200
105 LINE (A,B)-(C,D)
106 NEXT I
110 COLOR 0 ' 🟠 Changed color from 1 to 0
120 READ A,B 
121 READ C,D
135 IF A = 999 AND B = 999 AND C = 999 AND D = 999 THEN 600 
136 GOSUB 200
142 LINE (A,B)-(C,D)
145 REM FOR PAUSE = 1 TO 99 : NEXT PAUSE
150 GOTO 120
200 IF A>255 THEN A=255
201 IF B>191 THEN B=191
202 IF C>255 THEN C=255
203 IF D>191 THEN D=191
204 RETURN
600 REM END
601 A$=INPUT$(1)
1000 DATA 0,0,0,191,0,0,279,0
1001 DATA 279,0,279,191
1002 DATA 0,191,279,191
1003 DATA 120,3,128,3
1004 DATA 114,4,133,4
1005 DATA 109,5,136,5
1006 DATA 106,6,138,6
1007 DATA 103,7,140,7
1008 DATA 102,8,141,8
1009 DATA 101,9,143,9
1010 DATA 99,10,144,10
1011 DATA 97,11,145,11
1012 DATA 96,12,146,12
1013 DATA 95,13,148,13
1014 DATA 94,14,149,14
1015 DATA 93,15,150,15
1016 DATA 92,16,151,16
1017 DATA 91,17,152,17
1018 DATA 90,18,153,18
1019 DATA 90,19,154,19
1020 DATA 89,20,154,20
1021 DATA 89,21,155,21
1022 DATA 88,22,156,22
1023 DATA 88,23,157,23
1024 DATA 87,24,157,24
1025 DATA 87,25,158,25
1026 DATA 86,26,159,26
1027 DATA 86,27,159,27
1028 DATA 85,28,160,28
1029 DATA 85,29,161,29
1030 DATA 85,30,161,30
1031 DATA 84,31,161,31
1032 DATA 84,32,162,32
1033 DATA 84,33,162,33
1034 DATA 83,34,163,34
1035 DATA 83,35,163,35
1036 DATA 83,36,164,36
1037 DATA 82,37,164,37
1038 DATA 82,38,164,38
1039 DATA 82,39,165,39
1040 DATA 82,40,165,40
1041 DATA 81,41,165,41
1042 DATA 81,42,165,42
1043 DATA 81,43,166,43
1044 DATA 81,44,166,44
1045 DATA 81,45,166,45
1046 DATA 81,46,166,46
1048 DATA 80,47,109,47,112,47,165,47,81,48,109,48,116,48,165,48
1049 DATA 81,49,109,49,120,49,156,49,160,49,166,49
1050 DATA 48,50,50,50,81,50,109,50,124,50,153,50,161,50,165,50
1051 DATA 47,51,51,51,81,51,109,51,129,51,150,51,161,51,165,51
1052 DATA 45,52,47,52,51,52,53,52,81,52,109,52,132,52,147,52,161,52,165,52
1053 DATA 26,53,28,53,45,53,46,53,52,53,53,53,81,53,109,53,161,53,165,53
1054 DATA 25,54,30,54,44,54,46,54,52,54,54,54,57,54,58,54,82,54,109,54,161,54,165,54
1055 DATA 25,55,25,55,30,55,32,55,44,55,46,55,53,55,59,55,82,55,110,55,162,55,165,55
1056 DATA 23,56,24,56,31,56,32,56,44,56,46,56,54,56,55,56,59,56,60,56,82,56,110,56,157,56,158,56,162,56,164,56
1057 DATA 22,57,24,57,31,57,32,57,44,57,45,57,54,57,55,57,59,57,60,57,83,57,112,57,157,57,158,57,162,57,165,57
1058 DATA 22,58,23,58,31,58,32,58,44,58,45,58,53,58,54,58,60,58,61,58,78,58,78,58,83,58,114,58,156,58,157,58,162,58,164,58
1059 DATA 22,59,23,59,31,59,32,59,44,59,45,59,53,59,54,59,60,59,61,59,78,59,79,59,83,59,116,59,155,59,157,59,162,59,164,59
1060 DATA 22,60,23,60,31,60,32,60,43,60,45,60,53,60,54,60,60,60,61,60,78,60,80,60,84,60,118,60,152,60,156,60,162,60,164,60
1061 DATA 22,61,23,61,31,61,32,61,43,61,45,61,53,61,54,61,60,61,61,61,79,61,81,61,84,61,120,61,151,61,155,61,162,61,163,61
1062 DATA 22,62,23,62,31,62,32,62,43,62,45,62,53,62,54,62,60,62,61,62,79,62,81,62,84,62,122,62,148,62,154,62,162,62,163,62
1063 DATA 22,63,23,63,31,63,32,63,43,63,45,63,53,63,54,63,60,63,61,63,80,63,124,63,146,63,154,63,162,63,162,63
1064 DATA 22,64,23,64,31,64,32,64,42,64,44,64,53,64,54,64,60,64,60,64,80,64,127,64,142,64,152,64,162,64,162,64
1065 DATA 22,65,23,65,32,65,32,65,42,65,44,65,52,65,53,65,60,65,60,65,80,65,130,65,140,65,151,65,162,65,162,65
1066 DATA 22,66,23,66,32,65,32,66,42,66,44,66,52,66,53,66,60,66,60,66,80,66,118,66,120,66,130,66,139,66,144,66,146,66,155,66,162,66,162,66
1067 DATA 22,67,23,67,32,67,32,67,42,67,43,67,52,67,53,67,60,67,60,67,81,67,117,67,121,67,123,67,126,67,130,67,139,67,144,67,147,67,156,67,162,67,163,67
1068 DATA 19,68,23,68,32,68,32,68,41,68,43,68,52,68,53,68,60,68,60,68,81,68,111,68,122,68,123,68,128,68,130,68,141,68,143,68,149,68,156,68,162,68,163,68
1069 DATA 18,69,23,69,32,69,32,69,41,69,42,69,52,69,53,69,60,69,60,69,81,69,107,69,128,69,130,69,154,69,156,69,162,69,162,69
1070 DATA 17,70,18,70,22,70,23,70,32,70,32,70,41,70,42,70,52,70,53,70,60,70,60,70,81,70,104,70,129,70,129,70
1071 DATA 17,71,17,71,23,71,24,71,32,71,32,71,40,71,41,71,52,71,53,71,60,71,60,71,81,71,102,71,129,71,129,71
1072 DATA 17,72,17,72,24,72,24,72,32,72,32,72,40,72,41,72,52,72,53,72,60,72,60,72,81,72,101,72
1073 DATA 16,73,17,73,24,73,24,73,32,73,32,73,40,73,41,73,52,73,52,73,60,73,60,73,81,73,101,73
1074 DATA 15,74,16,74,24,74,24,74,32,74,32,74,40,74,41,74,51,74,52,74,60,74,60,74,81,74,96,74,98,74,101,74,128,74,129,74
1075 DATA 15,75,16,75,24,75,24,75,32,75,32,75,40,75,41,75,51,75,51,75,60,75,60,75,81,75,96,75,98,75,102,75,127,75,129,75
1076 DATA 15,76,16,76,24,76,24,76,32,76,32,76,39,76,40,76,51,76,51,76,59,76,60,76,82,76,96,76,98,76,103,76,127,76,129,76
1077 DATA 15,77,16,77,24,77,24,77,32,77,32,77,39,77,40,77,50,77,51,77,59,77,60,77,82,77,96,77,99,77,103,77,126,77,129,77
1078 DATA 15,78,16,78,24,78,24,78,32,78,33,78,39,78,40,78,50,78,51,78,59,78,60,78,82,78,96,78,100,78,104,78,126,78,129,78
1079 DATA 14,79,15,79,24,79,24,79,32,79,33,79,39,79,40,79,50,79,51,79,59,79,60,79,83,79,96,79,100,79,105,79,124,79,128,79
1080 DATA 14,80,15,80,24,80,24,80,32,80,33,80,38,80,39,80,50,80,50,80,59,80,60,80,83,80,94,80,99,80,106,80,124,80,128,80
1081 DATA 14,81,15,81,24,81,24,81,32,81,33,81,38,81,39,81,49,81,50,81,59,81,60,81,84,81,93,81,98,81,106,81,123,81,128,81
1082 DATA 14,82,15,82,24,82,24,82,32,82,33,82,38,82,39,82,49,82,50,82,59,82,60,82,84,82,92,82,98,82,106,82,123,82,128,82
1083 DATA 14,83,15,83,24,83,24,83,32,83,33,83,38,83,39,83,49,83,50,83,59,83,59,83,85,83,92,83,97,83,107,83,123,83,128,83
1084 DATA 14,84,15,84,24,84,24,84,33,84,33,84,38,84,38,84,49,84,50,84,59,84,59,84,86,84,92,84,97,84,108,84,123,84,128,84
1085 DATA 14,85,15,85,24,85,24,85,33,85,33,85,37,85,38,85,49,85,49,85,59,85,59,85,86,85,92,85,97,85,110,85,124,85,128,85
1086 DATA 14,86,15,86,25,86,25,86,34,86,34,86,37,86,37,86,49,86,50,86,59,86,59,86,87,86,93,86,97,86,111,86,124,86,128,86
1087 DATA 14,87,15,87,25,87,25,87,34,87,34,87,37,87,37,87,49,87,50,87,59,87,59,87,88,87,93,87,98,87,111,87,124,87,128,87
1088 DATA 14,88,15,88,25,88,25,88,34,88,34,88,37,88,37,88,49,88,50,88,59,88,59,88,89,88,93,88,97,88,111,88,124,88,130,88,120,89,121,89
1089 DATA 14,89,15,89,25,89,25,89,34,89,34,89,37,89,37,89,49,89,50,89,59,89,59,89,90,89,92,89,97,89,111,89,124,89,130,89
1090 DATA 14,90,15,90,25,90,25,90,34,90,34,90,36,90,36,90,48,90,50,90,59,90,59,90,97,90,112,90,120,90,121,90,125,90,132,90
1091 DATA 14,91,15,91,25,91,25,91,34,91,34,91,36,91,36,91,48,91,50,91,59,91,59,91,96,91,113,91,119,91,120,91,125,91,132,91
1092 DATA 14,92,15,92,25,92,25,92,34,92,36,92,48,92,50,92,59,92,59,92,94,92,113,92,119,92,120,92,126,92,140,92
1093 DATA 14,93,15,93,26,93,26,93,35,93,35,93,48,93,49,93,59,93,59,93,94,93,113,93,118,93,119,93,127,93,137,93
1094 DATA 14,94,16,94,26,94,26,94,47,94,49,94,59,94,59,94,95,94,114,94,117,94,120,94,128,94,133,94
1095 DATA 15,95,16,95,26,95,26,95,46,95,48,95,59,95,59,95,95,95,114,95,117,95,120,95,128,95,132,95
1096 DATA 15,96,16,96,26,96,26,96,46,96,48,96,59,96,59,96,95,96,113,96,117,96,120,96
1097 DATA 15,97,16,97,26,97,26,97,46,97,47,97,59,97,59,97,95,97,113,97,116,97,119,97
1098 DATA 15,98,16,98,26,98,27,98,59,98,59,98,95,98,113,98,116,98,120,98
1099 DATA 15,99,16,99,26,99,27,99,59,99,59,99,96,99,113,99,115,99,120,99
1100 DATA 15,100,16,100,26,100,26,100,59,100,59,100,96,100,113,100,115,100,118,100
1101 DATA 15,101,16,101,25,101,25,101,58,101,59,101,96,101,114,101,116,101,117,101
1102 DATA 15,102,16,102,58,102,59,102,97,102,117,102
1103 DATA 15,103,16,103,58,103,58,103,97,103,118,103
1104 DATA 15,104,16,104,58,104,58,104,97,104,121,104
1105 DATA 15,105,16,105,58,105,58,105,97,105,123,105
1106 DATA 15,106,16,106,58,106,58,106,97,106,136,106
1107 DATA 14,107,15,107,58,107,58,107,97,107,145,107
1108 DATA 14,108,15,108,58,108,59,108,97,108,116,108,118,108,123,108
1109 DATA 14,109,15,109,58,109,59,109,97,109,116,109,118,109,124,109
1110 DATA 14,110,15,110,58,110,59,110,96,110,116,110,118,110,125,110
1111 DATA 13,111,16,111,58,111,59,111,95,111,116,111,118,111,128,111
1112 DATA 13,112,16,112,58,112,59,112,95,112,115,112,119,112,136,112
1113 DATA 13,113,15,113,58,113,59,113,95,113,115,113,120,113,140,113
1114 DATA 13,114,15,114,58,114,59,114,90,114,92,114,95,114,116,114,121,114,137,114
1115 DATA 12,115,14,115,58,115,59,115,88,115,92,115,93,115,116,115,122,115,127,115
1116 DATA 12,116,14,116,58,116,59,116,86,116,88,116,94,116,116,116
1117 DATA 12,117,14,117,58,117,59,117,84,117,86,117,95,117,116,117,149,117,150,117
1118 DATA 12,118,14,118,58,118,59,118,83,118,85,118,95,118,117,118,149,118,150,118
1119 DATA 12,119,14,119,59,119,60,119,82,119,84,119,94,119,117,119,149,119,150,119
1120 DATA 12,120,14,120,59,120,60,120,81,120,82,120,92,120,118,120,149,120,151,120
1121 DATA 12,121,14,121,59,121,60,121,80,121,81,121,92,121,119,121,149,121,151,121
1122 DATA 12,122,14,122,60,122,61,122,78,122,80,122,90,122,121,122,149,122,152,122
1123 DATA 12,123,14,123,60,123,61,123,76,123,78,123,90,123,124,123,149,123,153,123
1124 DATA 12,124,15,124,60,124,61,124,73,124,75,124,89,124,124,124,149,124,153,124
1125 DATA 12,125,15,125,60,125,62,125,72,125,74,125,88,125,131,125,148,125,153,125
1126 DATA 12,126,15,126,62,126,64,126,70,126,72,126,87,126,140,126,147,126,154,126
1127 DATA 13,127,15,127,63,127,64,127,69,127,71,127,86,127,139,127,146,127,158,127,156,127,161,127
1128 DATA 13,128,15,128,64,128,69,128,85,128,136,128,143,128,153,128,159,128,164,128
1129 DATA 13,129,15,129,67,129,67,129,84,129,134,129,141,129,153,129,162,129,168,129
1130 DATA 13,130,15,130,83,130,133,130,138,130,153,130,166,130,170,130
1131 DATA 13,131,15,131,82,131,132,131,136,131,153,131,169,131,173,131
1132 DATA 13,132,15,132,81,132,132,132,135,132,152,132,172,132,175,132,179,132,181,132
1133 DATA 13,133,15,133,80,133,151,133,174,133,182,133
1134 DATA 13,134,15,134,78,134,151,134,177,134,184,134
1135 DATA 14,135,16,135,77,135,150,135,180,135,185,135
1136 DATA 14,136,16,136,76,136,149,136,182,136,187,136
1137 DATA 14,137,16,137,75,137,148,137,183,137,188,137
1138 DATA 14,138,16,138,74,138,147,138
1139 DATA 14,139,16,139,73,139,146,139
1140 DATA 15,140,17,140,73,140,145,140
1141 DATA 15,141,17,141,72,141,144,141
1142 DATA 15,142,17,142,70,142,143,142
1143 DATA 15,143,18,143,67,143,142,143
1144 DATA 15,144,18,144,65,144,87,144,98,144,111,144,116,144,141,144
1145 DATA 15,145,18,145,63,145,87,145,94,145,97,145,104,145,110,145,120,145,140,145
1146 DATA 15,146,18,146,59,146,86,146,95,146,97,146,107,146,110,146,123,146,136,146
1147 DATA 15,147,19,147,59,147,85,147,96,147,100,147,107,147,112,147,126,147,135,147
1148 DATA 15,148,20,148,57,148,85,148,97,148,103,148,108,148,113,148,129,148,134,148
1149 DATA 14,149,20,149,56,149,81,149,100,149,116,149
1150 DATA 13,150,21,150,34,150,34,150,55,150,64,150,68,150,80,150,103,150,120,150
1151 DATA 13,151,21,151,34,151,35,151,70,151,81,151,110,151,121,151
1152 DATA 12,152,22,152,33,152,37,152,41,152,42,152,54,152,55,152,72,152,82,152,116,152,122,152
1153 DATA 12,153,26,153,30,153,42,153,51,153,55,153,73,153,87,153,118,153,124,153
1154 DATA 11,154,36,154,40,154,45,154,48,154,54,154,74,154,87,154,120,154,125,154
1155 DATA 10,155,29,155,40,155,45,155,48,155,52,155,77,155,90,155,122,155,126,155
1156 DATA 10,156,31,156,40,156,51,156,79,156,92,156,124,156,127,156
1157 DATA 9,157,30,157,41,157,39,157,80,157,95,157,125,157,127,157
1158 DATA 9,158,15,158,17,158,20,158,42,158,46,158,55,158,55,158,82,158,98,158,127,158,129,158
1159 DATA 8,159,15,159,17,159,20,159,43,159,45,159,54,159,55,159,83,159,99,159,127,159,128,159
1160 DATA 7,160,14,160,17,160,21,160,54,160,55,160,84,160,101,160
1161 DATA 7,161,13,161,16,161,31,161,54,161,56,161,86,161,103,161
1162 DATA 6,162,12,162,17,162,21,162,28,162,32,162,54,162,56,162,86,162,105,162
1163 DATA 5,163,12,163,18,163,21,163,55,163,57,163,87,163,106,163,173,163,173,163
1164 DATA 5,164,12,164,19,164,22,164,56,164,59,164,89,164,107,164,173,164,174,164
1165 DATA 5,165,11,165,20,165,23,165,27,165,28,165,58,165,60,165,89,165,108,165,173,165,175,165
1166 DATA 5,166,10,166,21,166,23,166,27,166,28,166,58,166,60,166,90,166,110,166,173,166,176,166
1167 DATA 5,167,10,167,22,167,25,167,27,167,28,167,60,167,63,167,92,167,112,167,171,167,171,167,173,167,176,167,179,167,179,167
1168 DATA 5,168,9,168,24,168,25,168,27,168,28,168,61,168,63,168,93,168,113,168,170,168,170,168,173,168,177,168,180,168,181,168
1169 DATA 5,169,9,169,24,169,28,169,62,169,65,169,93,169,113,169,169,169,169,169,173,169,178,169,181,169,182,169
1170 DATA 5,170,8,170,25,170,25,170,64,170,65,170,95,170,117,170,169,170,169,170,174,170,179,170,183,170,183,170
1171 DATA 5,171,8,171,26,171,26,171,65,171,65,171,86,171,91,171,96,171,118,171,169,171,169,171,174,171,179,171,183,171,183,171
1172 DATA 5,172,7,172,26,172,26,172,66,172,70,172,86,172,93,172,97,172,121,172,169,172,170,172,174,172,175,172,178,172,180,172,183,172,183,172
1173 DATA 5,173,7,173,26,173,26,173,68,173,71,173,87,173,121,173,170,173,170,173,174,173,175,173,180,173,180,173
1174 DATA 5,174,7,174,25,174,25,174,70,174,70,174,75,174,75,174,88,174,122,174,174,174,174,174
1175 DATA 5,175,6,175,25,175,25,175,70,175,77,175,88,175,124,175,177,175,179,175
1176 DATA 5,176,5,176,25,176,25,176,70,176,80,176,90,176,125,176,176,176,178,176
1177 DATA 5,177,5,177,25,177,25,177,31,177,31,177,70,177,82,177,90,177,126,177
1178 DATA 5,178,5,178,24,178,25,178,30,178,32,178,71,178,84,178,92,178,114,178,120,178,127,178
1179 DATA 5,179,5,179,23,179,24,179,30,179,31,179,71,179,84,179,92,179,113,179,122,179,127,179
1180 DATA 5,180,5,180,21,180,23,180,28,180,32,180,73,180,84,180,95,180,113,180,122,180,127,180
1181 DATA 5,181,5,181,21,181,23,181,29,181,31,181,73,181,85,181,97,181,113,181,124,181,126,181
1182 DATA 22,182,23,182,28,182,32,182,74,182,85,182,98,182,113,182,124,182,126,182
1183 DATA 22,183,30,183,74,183,88,183,98,183,114,183
1184 DATA 21,184,25,184,74,184,114,184
1185 DATA 21,185,21,185,81,185,108,185
1200 DATA 999,999,999,999